<?php
/*
# ------------------------------------------------------------------------
# JA Job Board Package
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/

  defined('_JEXEC') or die('Retricted Access');
  global $option;
  $user = JFactory::getUser();
  $item = $this->item;
  $text_saved_succ = JRequest::getVar('listtype')=='ja_resumes'?JText::_('Add resume to favourite successfully'):JText::_('Add job to favourite successfully');
  if (JRequest::getVar('succ_saved'))
  	echo "<font color=\"Blue\"><i><h5>".$text_saved_succ."</h5></i></font>";
?>
<script type="text/javascript" language="javascript">
//<![CDATA[
function submitbutton(pressbutton) {	

	if (pressbutton == 'cancel') {
		submitform( pressbutton );
		return;
	}
	if ( pressbutton == 'save' || pressbutton == 'apply' ){
		if(form.name.value == '' ){
		    alert('<?php echo JText::_('Category name could not be empty ')?>');
			form.name.focus();
			return;
		}	
		
		submitform( pressbutton );
	}					
	else {
		submitform( pressbutton );
	}
}
//]]>
</script>
<form name="adminForm" action="<?php echo JURI::root();?>index.php" method="post">
	<h3><?php echo JRequest::getVar('listtype')=='ja_resumes'?JText::_('Note for favourite resume'):JText::_('Note for favourite job'); ?></h3>
	<table width="100%">
	<tr>
	
		<td>
			<textarea rows="15" cols="90" name="description" id="description"><?php echo $item->description; ?></textarea>
		    
		</td>
	</tr>
	<tr>
		<td>
			<input type="submit" name="save" value="<?php echo JText::_('Save');?>" />
			<input type="button" name="cancel" value="<?php echo JText::_('Exit'); ?>" onclick="window.parent.close_note()" />
		</td>
		
	</tr>
	</table>
	<input type="hidden" name="id" value="<?php echo $item->id; ?>" />
	<input type="hidden" name="cid[]" value="<?php echo JRequest::getVar('item_id'); ?>" />
	<input type="hidden" name="user_id" value="<?php echo $user->id; ?>" />
	<input type="hidden" name="item_id" value="<?php echo JRequest::getVar('item_id'); ?>" />
	<input type="hidden" name="listtype" value="<?php echo JRequest::getVar('listtype'); ?>" />
	<input type="hidden" name="save_date" value="<?php echo date('Y-m-d H:i:s'); ?>" />
	<input type="hidden" name="option" value="<?php echo $option; ?>" />
	<input type="hidden" name="view" value="jashortlist" />
	<input type="hidden" name="task" value="save" />
	<?php echo JHTML::_( 'form.token' ); ?>	
 </form>
